package com.newcoder.huawei;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 输入
 * I am a boy
 * 输出
 * boy a am I
 */
public class Jznx {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        while ((s = br.readLine()) != null) {
            String[] ss = s.split(" ");
            for (int i = 0; i < ss.length; i++) {
                System.out.print(ss[ss.length - i - 1] + " ");
            }
        }
    }
}
